package com.liao.mongodb.dao;

import com.liao.mongodb.pojo.TbUser;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface UserDao extends CrudRepository<TbUser,String>,UserCustomDao {

    List<TbUser> findAll();

    @Query("{$or : {{id : ?0},{password : ?1}} }")
    List<TbUser> customQuery(String id,String password);

}
